package com.btpn.custody.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/*
 * Tracing Log MD for STATUS_MD changes that start from NPY(1) until APP(5)
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true, dynamicUpdate=true)
@Table(name = "TL_MD")
public class TL_MD implements Serializable {

	private static final long serialVersionUID = -3071433172678949997L;

	@Id 
	@GeneratedValue
	@Column(name = "ID")
	private Long id;
	
	@Column(name = "ACTION", columnDefinition="VARCHAR(1)")
	private String action;
	
	@Column(name = "ACTION_DATE")
	private Date actionDate = new Date();
	
	@Column(name = "ACTION_USER", columnDefinition="VARCHAR(100)")
	private String user;

	@Column(name = "DETAIL", columnDefinition="VARCHAR(100)")
	private String detail;
	
	@Column(name = "CHANGE_STATUS", columnDefinition="VARCHAR(8)")
	private String changeStatus;

	public TL_MD() {
		super();
	}

	public TL_MD(String action, String user, String detail, String changeStatus) {
		super();
		this.action = action;					// CUD							|	CUD
		this.detail = detail;					// mdId - cif - (account)		|	SLA days from 3 to 1
		this.user = user;						// branch - username			|	admin
		this.changeStatus = changeStatus;		// 1 -> 2						|	
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public Date getActionDate() {
		return actionDate;
	}

	public void setActionDate(Date actionDate) {
		this.actionDate = actionDate;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}
	
	public String getChangeStatus() {
		return changeStatus;
	}

	public void setChangeStatus(String changeStatus) {
		this.changeStatus = changeStatus;
	}
}
